# -*- encoding:ascii -*-
from mako import runtime, filters, cache
UNDEFINED = runtime.UNDEFINED
__M_dict_builtin = dict
__M_locals_builtin = locals
_magic_number = 8
_modified_time = 1357474420.012
_enable_loop = True
_template_filename = 'resources/Fragen.html'
_template_uri = 'resources/Fragen.html'
_source_encoding = 'ascii'
_exports = []


def render_body(context,**pageargs):
    __M_caller = context.caller_stack._push_frame()
    try:
        __M_locals = __M_dict_builtin(pageargs=pageargs)
        selectedThema = context.get('selectedThema', UNDEFINED)
        themenlist = context.get('themenlist', UNDEFINED)
        unBeantworteteFragenList = context.get('unBeantworteteFragenList', UNDEFINED)
        beantworteteFragenList = context.get('beantworteteFragenList', UNDEFINED)
        __M_writer = context.writer()
        # SOURCE LINE 1
        __M_writer(u'\r\n\r\n<h2>Fragen Filter</h2>\r\n\r\n<a href="/Fragen">Default Sort</a>\r\n\r\n<form action="/Fragen/" method="post" accept-charset="utf-8">\r\n\r\n    <label>thematisch Auflisten</label>\r\n   \r\n    <select name="orderbythema" id="Select1">\r\n')
        # SOURCE LINE 12
        for a in themenlist:
            # SOURCE LINE 13
            if a.Bezeichner == selectedThema:
                # SOURCE LINE 14
                __M_writer(u'                <option selected> ')
                __M_writer(unicode(a.Bezeichner))
                __M_writer(u' </option>\r\n')
                # SOURCE LINE 15
            else:
                # SOURCE LINE 16
                __M_writer(u'                <option> ')
                __M_writer(unicode(a.Bezeichner))
                __M_writer(u'  </option>\r\n')
            # SOURCE LINE 18
            __M_writer(u'            \r\n')
        # SOURCE LINE 20
        __M_writer(u'    </select>\r\n\r\n    <button type="submit">Sort</button>\r\n </form>\r\n\r\n<h2>Beantwortete Fragen Liste</h2>\r\n    <ul>\r\n')
        # SOURCE LINE 27
        for a in beantworteteFragenList:
            # SOURCE LINE 28
            __M_writer(u'    <li>\r\n        <p>\r\n            <label>Frage:</label> \r\n            <label>')
            # SOURCE LINE 31
            __M_writer(unicode(a.Frage.Text))
            __M_writer(u'</label>\r\n\r\n            <a href="/Fragen/open?FrageText=')
            # SOURCE LINE 33
            __M_writer(unicode(a.Frage.Text))
            __M_writer(u'&amp;AbschnittBezeichner=')
            __M_writer(unicode(a.AbschnittBezeichner))
            __M_writer(u'&amp;LerneinheitNummer=')
            __M_writer(unicode(a.LerneinheitNummer))
            __M_writer(u'">Open</a>\r\n            <a href="/Fragen/remove?FrageText=')
            # SOURCE LINE 34
            __M_writer(unicode(a.Frage.Text))
            __M_writer(u'&amp;AbschnittBezeichner=')
            __M_writer(unicode(a.AbschnittBezeichner))
            __M_writer(u'&amp;LerneinheitNummer=')
            __M_writer(unicode(a.LerneinheitNummer))
            __M_writer(u'">Remove</a>\r\n\r\n        </p>\r\n        <p>\r\n            <label>Antwort:</label>\r\n            <label>')
            # SOURCE LINE 39
            __M_writer(unicode(a.Frage.Antwort.Text))
            __M_writer(u'</label>\r\n        </p>\r\n\r\n           </li>\r\n')
        # SOURCE LINE 44
        __M_writer(u'    </ul>\r\n\r\n<h2>Unbeantwortete Fragen Liste</h2>\r\n    <ul>\r\n')
        # SOURCE LINE 48
        for a in unBeantworteteFragenList:
            # SOURCE LINE 49
            __M_writer(u'    <li>\r\n        <p>\r\n            <label>Frage:</label> \r\n            <label>')
            # SOURCE LINE 52
            __M_writer(unicode(a.Frage.Text))
            __M_writer(u'</label>\r\n            <a href="/Fragen/open?FrageText=')
            # SOURCE LINE 53
            __M_writer(unicode(a.Frage.Text))
            __M_writer(u'&amp;AbschnittBezeichner=')
            __M_writer(unicode(a.AbschnittBezeichner))
            __M_writer(u'&amp;LerneinheitNummer=')
            __M_writer(unicode(a.LerneinheitNummer))
            __M_writer(u'">Open</a>\r\n            <a href="/Fragen/remove?FrageText=')
            # SOURCE LINE 54
            __M_writer(unicode(a.Frage.Text))
            __M_writer(u'&amp;AbschnittBezeichner=')
            __M_writer(unicode(a.AbschnittBezeichner))
            __M_writer(u'&amp;LerneinheitNummer=')
            __M_writer(unicode(a.LerneinheitNummer))
            __M_writer(u'">Remove</a>\r\n\r\n        </p>\r\n\r\n          </li>\r\n')
        # SOURCE LINE 60
        __M_writer(u'    </ul>\r\n\r\n\r\n')
        return ''
    finally:
        context.caller_stack._pop_frame()


